<?php
namespace Deployer;

require 'recipe/laravel.php';

// Project name /Users/mac/Desktop/my/lara/my/jds/yizhuang-kernel
set('application', 'jds');

// Project repository
set('repository', 'git@github.com:lorisleiva/mylaravelapp.git');

// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', false);

// Shared files/dirs between deploys
add('shared_files', []);
add('shared_dirs', []);

// Writable dirs by web server
add('writable_dirs', []);


// Hosts

host('jd.wisdomcms.cn')
   // ->set('deploy_path', '~/{{application}}')//服务目录
    ->user('root') //服务器用户名
    ->identityFile('~/.ssh/deployerkey')
    //->identityFile('~/.ssh/id_rsa') // 服务器密钥
    ->set('deploy_path', '/www/wwwroot/jds'); // 部署到服务器上目录

// Tasks

task('build', function () {
    run('cd {{release_path}} && build');
});

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

// Migrate database before symlink new release.

// before('deploy:symlink', 'artisan:migrate');

